import path from 'path';
import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'

const routes = [
  { path: '/', name: '登录', component: () => import('@/views/Home/login.vue') },
  { path: '/index', name: '首页', component: () => import('@/views/Home/index.vue') },
  { path: '/CompanyInfo', name: '单位信息', component: () => import('@/views/CompanyInfo/index.vue') },
  { path: '/CompanyList', name: '单位列表', component: () => import('@/views/CompanyInfo/companyList.vue') },
  { path: '/CompanyApproveDetail', name: '两硕一博申请详情', component: () => import('@/views/CompanyApprove/detail.vue') },
  { path: '/CompanyDetail', name: '单位详情', component: () => import('@/views/CompanyInfo/detail.vue') },
  { path: '/DataStatistics', name: '数据统计', component: () => import('@/views/DataStatistics/index.vue') },
  { path: '/Approval', name: '审核列表', component: () => import('@/views/Approval/index.vue') },
  { path: '/ApprovalDetail', name: '审核信息详情', component: () => import('@/views/Approval/detail.vue') },
];

// 3. 创建路由实例并传递 `routes` 配置
// 你可以在这里输入更多的配置，但我们在这里
// 暂时保持简单
const router = createRouter({
  // 4. 内部提供了 history 模式的实现。为了简单起见，我们在这里使用 hash 模式。
  history: createWebHashHistory(),
  routes, // `routes: routes` 的缩写
})

//  配置全局路由


export default router;